'use strict';
const ms = require('ms');
const Base = require('./base');
const { getCode } = require('../helpers/home');
class HomeController extends Base {
  async getValidateCode() {
    const {ctx} = this;
    const {data, text} = getCode()
    ctx.session.code = text;
    this.success({
      msg: '获取验证码成功',
      data: {
        svg: data
      }
    })
  }
}

module.exports = HomeController;
